<?php
declare (strict_types = 1);

namespace app\controller;

use app\service\ExamService;
use think\App;
use app\BaseController;

class ExamController extends BaseController
{
    private $service;

    public function __construct(App $app)
    {

        parent::__construct($app);
        $this->service = new ExamService();
    }
    public function getExam(){
        return $this->service->getExam();
    }
    public function intoExam(){
        $data = $this->request->param(['id','studnet_id','name']);
        $this->service->intoExam($data);
        return $this->returnJson();
    }
    public function deleteExam($id){
        $this->service->deleteExam($id);
        return $this->returnJson();
    }
}
